<?php
/**
 * Created by PhpStorm.
 * User: Krystal
 * Date: 2018/9/3
 * Time: 18:16
 */

namespace App\Tools\Validates;

use App\Tools\Validate;
use Illuminate\Validation\Rule;
class Comment extends Validate
{
    protected $field = [
            'id'=>'评论id',
            'article_id'=>'文章id',
            'uid'=>'用户',
            'content'=>'内容',
            'p_id'=>'楼层id',
            'to_uid'=>'回复用户', 
    ];
    protected $rule = [
            'id' => 'require|integer',
            'article_id'=>'require|integer',
            'uid'=>'require|integer',
            'content'=>'require',
            'p_id'=>'require|integer',
            'to_uid'=>'require|integer', 
        
    ];

    protected $scene = [
        'add' => ['article_id','uid','content','to_uid'],
        'del' => ['id','user_id'],
    ];
}
